﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;

namespace K9Nano.IM.Models
{
    [Table("FrameworkUsers")]
    public class User : FrameworkUserBase
    {
        [Display(Name = "签名")]
        [StringLength(200)]
        public string Sign { get; set; }

        [Display(Name = "状态")]
        [Required]
        public bool Online { get; set; }

        [Display(Name = "昵称")]
        [Required(AllowEmptyStrings = false)]
        [StringLength(50, ErrorMessage = "{0}stringmax{1}")]
        public string Nickname { get; set; }
        
        [Display(Name = "APP")]
        [Required]
        public Guid AppId { get; set; }

        [Display(Name = "APP")]
        public virtual ChatApp App { get; set; }
        
        [Display(Name = "外部ID")]
        [StringLength(50, ErrorMessage = "{0}stringmax{1}")]
        public string ExternalId { get; set; }

        [Display(Name = "头像")]
        [StringLength(200, ErrorMessage = "{0}stringmax{1}")]
        public string Avatar { get; set; }
    }
}